﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 匿名函数LambdaLinq
{
    class Program
    {
        static void Main(string[] args)
        {

            #region Action
            Action action1 = () => Console.WriteLine("213");
            action1.Invoke();

            Action<string> action2 = t => Console.WriteLine(t);
            action2.Invoke("qiaoansheng");

            Action<string> action3 = (t) => Console.WriteLine(t);
            action3.Invoke("qiaoansheng action3");

            Action<string> action4 = (string t) => Console.WriteLine(t);
            action4.Invoke("qiaoansheng action4");

            Action<string> action5 = (string t) =>
            {
                Console.WriteLine(t);
            };
            action5.Invoke("qiaoansheng action4");
            #endregion

            #region Func
            Func<string> func1 = () =>
                {
                    return "";
                };
            func1.Invoke();
            Func<int, int, string> func2 = (int1, int2) =>
            {
                return (int1 + int2).ToString();
            };
            func2.Invoke(1, 2);
            #endregion

            #region Linq

            #endregion

            Console.ReadLine();
        }
    }
}
